//
//  LoginViewModel.swift
//  Login
//
//  Created by moon on 30/10/24.
//

import Foundation
import UIKit

protocol LoginViewModelProtocol {
    var coordinator: LoginMainCoordinator { get }
    var onLoginSuccess: (() -> Void)? { get set }
    func signInUser(email: String, password: String)
}

class LoginViewModel: LoginViewModelProtocol {
    
    var coordinator: LoginMainCoordinator
    init(coordinator: LoginMainCoordinator) {
        self.coordinator = coordinator
    }
    
    var onLoginSuccess: (() -> Void)?
    
    
    func signInUser(email: String, password: String) {
        self.coordinator.callHome(withUserName: email)
    }
    
}
